#ifndef FILEINTERFACE_H_
#define FILEINTERFACE_H_

#include <map>
#include <string>
#include <vector>
#include "namespaces.cpp"
#include "Place.h"
#include "Transition.h"
#include "PlaceToTransition.h"
#include "TransitionToPlace.h"

class pn::FileInterface
{
	public:
		explicit	FileInterface(const std::string&);
		virtual		~FileInterface();
		void		setInputFilePath(const std::string&);
		bool		readInputFile();
		std::map<std::string, Place*>				getPlaces();
		std::map<std::string, Transition*>			getTransitions();
		std::map<std::string, PlaceToTransition*>	getPlacesToTransitions();
		std::map<std::string, TransitionToPlace*>	getTransitionsToPlaces();
	protected:
		std::string	mInputFilePath;
		std::vector<std::string>				mPlaces;
		std::vector<std::string>				mTransitions;
		std::vector<std::vector<std::string> >	mPlacesToTransitions;
		std::vector<std::vector<std::string> >	mTransitionsToPlaces;
		std::vector<std::string>				mMarkups;
		void readLine(const std::string&);
		void readPlaces(std::string);
		void readTransitions(std::string);
		void readPlacesToTransition(std::string);
		void readTransitionToPlaces(std::string);
		void readInitialMarkups(std::string);
};

#endif /*FILEINTERFACE_H_*/
